<template>
    <div class="new-detail">
        <div class="title">{{info.title}}</div>
        <div class="time">{{info.publDate}}</div>
        <div class="content" v-html="info.content"></div>
        <div class="tip">免责声明：本终端所载数据仅供参考，若数据有误，以交易所发布数据为准，不对您构成投资建议。</div>
    </div>
</template>

<script>
import {getUrlParams} from '@/common/common';
const {newId = '',stockId = '',kcType = ''} = getUrlParams();

import {getNewDetail} from '../api'
export default {
    props:{
        newId: {
            type: [String,Number],
            default: '30193827'
        }
    },
    data() {
        return {
            info:{}
        };
    },
    created(){
        this.getNewDetail();
    },
    methods: {
        getNewDetail() {
            getNewDetail({newId,stockId,kcType}).then(res=>{
                this.info = res.data;
            }).catch(err=>{

            })
        }
    }
}
</script>

<style lang="scss" scoped>
.new-detail {
    padding: 40px;
    .title {
        font-size: 18px;
        font-weight: 600;
        color: #000;
        text-align: center;
        padding: 10px 0;
    }
    .time {
        text-align: center;
        color: #666;
        padding: 20px 0;
    }
    .content {
        color: #333;
        padding: 20px 0;
        border-top: 1px solid #cecece;
        border-bottom: 1px solid #cecece;
        box-sizing: border-box;
        white-space:pre-wrap;
        line-height: 30px;
    }
    .tip {
        color: #999;
        padding: 20px 0;
        line-height: 20px;
    }
}
</style>
